<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page pageEncoding="UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<h1>Add HotelMapping</h1>

<script type="text/javascript" src="${contextPath}/static/script/jquery/jquery-1.4.2.js"></script>
<script type="text/javascript" src="${contextPath}/static/script/jquery/jquery.validate.js"></script>
<script type="text/javascript" language="JavaScript">
    $(function () {
        $("#add-hotel-mapping").validate();
    })
</script>
<html>
<body>
<div class="main">
    <s:form method="post" id="add-hotel-mapping" action="update.dhtml">
        <table class="search_hotel box_side clearfix property_table">
            <tr>
                <td class="key">IHG Hotel Code：</td>
                <td class="value">
                    <input type="hidden" value="${hotelMapping.id}" name="hotelMapping.id"/>
                    <input type="text" class="required" maxlength="20" value="${hotelMapping.cooperatorCode}"
                           name="hotelMapping.cooperatorCode"/>
                    <s:if test="#request.cooperatorCode_error !=null">
                        <span style="color:red;"><br>${cooperatorCode_error}</span>
                    </s:if>
                </td>

                <td class="key">Derby Hotel Code：</td>
                <td class="value">
                    <input type="text" class="required" maxlength="50" size="30" value="${hotelMapping.derbyCode}"
                           name="hotelMapping.derbyCode"/>
                    <s:if test="#request.derbyCode_error !=null">
                        <span style="color:red;"><br>${derbyCode_error}</span>
                    </s:if>
                </td>

                <td class="key">IHG Hotel Name：</td>
                <td class="value">
                    <input type="text" class="required" maxlength="255" value="${hotelMapping.hotelName}"
                           name="hotelMapping.hotelName"/>
                </td>
                <td class="key">Status：</td>
                <td class="value">
                    <s:select name="hotelMapping.status" cssClass="select"
                              list="@com.derbysoft.dswitch.adapter.ihg.common.domain.HotelStatus@values()"/>
                </td>
            </tr>
        </table>
        <div align="right">
            <ul>
                <li>
                    <input class="common_button" type="submit" value="submit"/>
                    &nbsp;
                    <input class="common_button" type="button" value="Back"
                           onclick="window.location.href='./list.dhtml'"/>
                </li>
            </ul>
        </div>
    </s:form>
</div>
</body>
</html>
